import store from '../base/store'
import Sprite from '../base/sprite'

/**
 * 背景精灵
 * @description 整个canvas的静态背景
 */
export class BackgroundSprite extends Sprite {
  constructor() {
    const image = Sprite.getMap('sprites')
    const background = Sprite.getSpritesData('background')
    super(
      image,
      background.sx,
      background.sy,
      background.sw,
      background.sh,
      0,
      0,
      store.canvas.width,
      store.canvas.height
    )
  }
}
